package shiqi.AdapterPattern.object;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

//客户端，测试
public class client {
    public static void main(String[] args) {
        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("applicationContext.xml");
        DataOperation dataOperation = (CipherAdapter)applicationContext.getBean("cipherAdapter");
        System.out.println("明文：" + dataOperation.getPassword());
        System.out.println("密文：" + dataOperation.doEncrypt(6,dataOperation.getPassword()));


    }
}
